<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>

    <style>
        body {
            margin: 0;
            padding: 0;
        }

        .advdiv {
            width: 100%;
            height: 100%;
            position: absolute;
        }

        @media (min-height: 220px) {
            .advdiv {
                background: url('../images/welcome/640/1.png') center center;
                width: 100%;
                height: 100%;
                background-size: cover;
                background-size: 100%;
            }
        }

        @media (min-height: 481px) {
            .advdiv {
                background: url('../images/welcome/1242/1.png') center center;
                width: 100%;
                height: 100%;
                background-size: cover;
                background-size: 100%;
            }
        }

        .weixin-tip p img {
            width: 100%;
        }

        .weixin-tip p {
            text-align: center;
            margin-top: 10%;
            padding: 0 5%;
        }

        .weixin-tip {
            /*display: none;*/
            position: fixed;
            left: 0;
            top: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.8);
            filter: alpha(opacity=80);
            height: 100%;
            width: 100%;
            z-index: 100000;
        }
    </style>
</head>
<body>
<div id="advdiv" style="display: none">
    <div class="weixin-tip">
        <p>
            <img src="http://www.o2abc.com/images/live_weixin.png" alt="微信打开">
        </p>
    </div>
    <div class="advdiv"></div>
</div>

</body>
<script>
    var iphone = navigator.userAgent.match(/(iPhone\sOS)\s([\d_]+)/);
    var wechat = navigator.userAgent.match(/(MicroMessenger)\/([\d\.]+)/i);
    var downloadUrl = "";

    // 判断IOS/Andriod
    if (iphone) {
        // APPStore 下载地址
        downloadUrl = "https://itunes.apple.com/us/app/ru-ci-sheng-huo/id1066576666?mt=8";
    } else {
        // Andriod 下载地址
        downloadUrl = "http://wap.soolife.cn/download/soolife.apk";
    }
    if (wechat) {
        document.getElementById("advdiv").style.display = 'block';
    }

    window.location.href = downloadUrl;

</script>
</html>